<extend name="Public:base" />

<block name="content">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><em class="glyphicon glyphicon-th-list"></em> 
            {$type}         
            </h3>
        </div>
        
    </div>
	
    <form action="{:U('upimgs')}" method="post" id="form_do" name="form_do">
    <div class="row margin-botton">
        <div class="col-sm-6 column">
            <div class="btn-group btn-group-md">
                <button class="btn btn-primary" type="button" onclick="chekform()"><em class="glyphicon glyphicon-plus-sign"></em> 批量入库</button>
                <!--<button class="btn btn-default" type="button" onclick="doConfirmBatch('{:U('del', array('batchFlag' => 1))}', '确实要删除选择项吗？')"><em class="glyphicon glyphicon-remove-circle"></em> 删除</button>-->
                
            </div>
        </div>
        
        <div class="col-sm-6 text-right">
            选择栏目 <select name="cid" >
                        <option value="0">请选择</option>
                        <foreach name='cate' item='v'>
                        <option value="{$v.id}">{$v.delimiter}{$v.name}</option>
                        </foreach>
                    </select>
        </div>
        
    </div>
    
    <div class="row">
        <div class="col-lg-12">
            
                <div class="table-responsive">
                    <table class="table table-hover xyh-table-bordered-out">
                        <thead>
                            <tr class="active">
                                <th><input type="checkbox" id="check"></th>
                                <th>编号</th>
                                <th>目录名称</th>
                                <th>路径</th>
                                <!--<th class="text-right">操作</th>-->
                            </tr>
                        </thead>
                        <tbody>
                        <foreach name='vlist' item='v'>
                        <tr>
                            <td><input type="checkbox" name="key[]" value="{$v['path']}"></td>
                            <td>{$key}</td>
                            <td>{$v['name']}</td>
                            <td>{$v['path']}</td>
                            <!--<td class="text-right">
                                <a href="javascript:;" onclick="toConfirm('{:U('del',array('path' => $v['path']), '')}', '确实要删除吗？')" class="label label-danger">删除</a>
                    
                            </td>-->
                        </tr>
                        </foreach>
                        </tbody>
                    </table>
                </div>
            

            <div class="row clearfix">
                <div class="col-md-12 column">
                    <div class="xyh-page">
                        {$page}
                    </div>
                </div>
            </div>

            
        </div>
    </div>
    </form>
    
	<script language="javascript">
	function chekform(){
		var keyValue = getCheckValues();
		if (!keyValue){
			layer.alert('请选择项！', {
				icon: 2
			});
			return false;
		}else{
			$('#form_do').submit();
		}
	}
	</script>
    </block>